/**
 * 
 */
package edu.byu.nlp.pipes;

/**
 * @author robbie
 *
 */
public abstract class AbstractStatelessPipeFactory<IL, ID, OL, OD> implements PipeFactory<IL, ID, OL, OD> {

	@Override
	public PipeAndData<IL, ID, OL, OD> process(Iterable<Instance<IL, ID>> input) {
		Pipe<IL, ID, OL, OD> pipe = createPipe();
		return PipeAndData.from(pipe.apply(input), pipe);
	}

	protected abstract Pipe<IL, ID, OL, OD> createPipe();
	
}
